import com.handler.invocationhandler;
import com.service.impl.someserviceImpl;
import com.service.impl.someserviceImpl2;
import com.service.someservice;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Proxy;

public class myapp {
    public static void main(String[] args) {
        someservice someservic=new someserviceImpl();
        InvocationHandler invocationHandler=new invocationhandler(someservic);
        someservice someservice1=
                (someservice) Proxy.newProxyInstance(
                someservic.getClass().getClassLoader()
                ,someservic.getClass().getInterfaces()
                ,invocationHandler);
        someservice1.dosome();
    }
}
